<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container1 {
            width: 100px;
            height: 100px;
            background-color: red;
            margin-bottom: 20px;
        }
        .container2 {
            width: 100px;
            height: 100px;
            background-color: green;
            margin-top: 50px;
        }
        .container3::before {
            content: "";
            display: table;
        }
    </style>
</head>
<body>
    <div class="container1"></div>
    <div class="container3">
        <div class="container2"></div>
    </div>
</body>
</html>